package com.yswy.app.controller;

import com.yswy.app.service.AppUserService;
import com.yswy.app.service.ManagementMenuService;
import com.yswy.common.model.ResultModel;
import com.yswy.domain.entity.ManagementMenu;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

import static com.yswy.domain.common.util.TokenUtils.getChannle;
import static com.yswy.domain.common.util.TokenUtils.getUserId;

@RestController
@RequestMapping("/management")
@Api(description = "菜单")
public class ManagementMenuController {
    @Autowired
    private ManagementMenuService managementMenuService;
    
    @RequestMapping(value = "getList", method = RequestMethod.GET)
    @ApiOperation(value = "获取列表")
    public ResultModel getIdName(HttpServletRequest request) {
        return ResultModel.ok(managementMenuService.getAll(getUserId(request)));
    }



}
